package com.bd.scm.module.qywx.service;


import com.bd.scm.module.qywx.thread.TokenThread;
import com.bd.scm.module.qywx.thread.WxTokenThread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Observable;
import java.util.Observer;

public class WxListener implements Observer{

	private static Logger log = LoggerFactory.getLogger(WxListener.class);

    @Override
    public void update(Observable o, Object arg) {
    	  log.info("微信公众号该线程死机");
        WxTokenThread run = new WxTokenThread();
        run.addObserver(this);
        new Thread(run).start();
        log.info("微信公众号该线程重启");
    }

}
